<div class="portlet">
  <div class="portlet-header">
    <h1><%=t ".title"%></h1>
  </div>
  <div class="portlet-content">
    <% form_for(@localuser, :url => localuser_path) do |f| %>
      <%= f.error_messages %>

      <table>
        <tbody>
          <tr>
            <td> <%= f.label t('activerecord.attributes.user.email') %> </td>
            <% if @localuser.contact.nil? %>
              <td> <%= f.text_field :email %> </td>
            <% else %>
              <td> <%= f.text_field :email, {:disabled => true} %> </td>
              <td><%=t('lbl_user_update_contact_mail')%></td>
            <% end %>
          </tr>
          <tr>
            <td> <%= f.label t('activerecord.attributes.user.roles') %> </td>
            <td>
              <% for role in User::ROLES %>
               <%= check_box_tag "user[roles][]", role, @localuser.roles.include?(role) %>
               <%= h t(role) %>
              <% end %>
              <%= hidden_field_tag "user[roles][]"%>
            </td>
          </tr>

        </tbody>
      </table>

      <div class="line-buttons">
        <%= f.submit t('btn_update') %>
      </div>
      <div class="line-links">
        <%= link_to t('btn_show'), localuser_path(@localuser) %> |
        <%= link_to t('btn_back'), localusers_redirect_back_path(localusers_path) %>
      </div>
    <% end %>
  </div>
  <div class="portlet-footer">
  </div>
</div>